home *** CD-ROM | disk | FTP | other *** search
/ Champak 49 / Volume 49 - JOGO DISK .iso / Games / honeytrouble.swf / scripts / DefineSprite_672 / frame_37 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  2.0 KB  |  70 lines

  1. stop();
  2. var thissec = int(_root.levelTimes / 25);
  3. var timeBonus = thissec * 10;
  4. var maxcomboBonus = _root.maxcombo * 10;
  5. if(_root.levelNum > 0 && _root.levelNum < 8)
  6. {
  7.    var levelBonus = 500;
  8. }
  9. else if(_root.levelNum >= 8 && _root.levelNum < 15)
  10. {
  11.    var levelBonus = 1000;
  12. }
  13. else if(_root.levelNum >= 15 && _root.levelNum < 22)
  14. {
  15.    var levelBonus = 1500;
  16. }
  17. var finalScore = _root.goal_total + timeBonus + maxcomboBonus + levelBonus;
  18. if(_root.show_mc_visible == true)
  19. {
  20.    show_mc._visible = true;
  21. }
  22. else if(_root.show_mc_visible == false)
  23. {
  24.    show_mc._visible = false;
  25. }
  26. bu2.onPress = function()
  27. {
  28.    _root.win_sound_.stop();
  29.    _root.show_mc_visible = false;
  30.    show_mc._visible = false;
  31.    _root.unblack = undefined;
  32.    delete _root.unblack;
  33.    if(_root.pop_.length <= 0)
  34.    {
  35.       _root.pop_ = ["h","o","n","e","y"];
  36.    }
  37.    _root.BOX_x.removeMovieClip();
  38.    _root.BOX_x.removeMovieClip();
  39.    _root.attachMovie("BOX_x","BOX_x",_root.getNextHighestDepth());
  40.    if(Number(_root.item_modified) >= 2)
  41.    {
  42.       if(Number(_root.item_modified) >= 2)
  43.       {
  44.          _root.Σ╕èΣ╕Çσìèσêåµò░ *= 1.1;
  45.          _root.Σ╕ïΣ╕Çσìèσêåµò░ *= 1.1;
  46.          trace("_root.score:" + _root.score);
  47.          _root.setGoal(Math.floor(_root.goal_total * 0.1));
  48.       }
  49.    }
  50.    _root.Σ╕èΣ╕Çσìèσêåµò░ += int(finalScore - _root.goal_total);
  51.    _root.setGoal(int(finalScore - _root.goal_total));
  52.    _root.goal_total = finalScore;
  53.    _root.score = _root.goal_total;
  54.    _root.teΣ╕èΣ╕Çσìèσêåµò░ = _root.Σ╕èΣ╕Çσìèσêåµò░;
  55.    _root.teΣ╕ïΣ╕Çσìèσêåµò░ = _root.Σ╕ïΣ╕Çσìèσêåµò░;
  56.    _root.levelNum = _root.levelNum + 1;
  57.    _root.level_pass.stop();
  58.    trace(" _root.levelNum = ttt  " + _root.levelNum);
  59.    if(_root.levelNum == 8 || _root.levelNum == 15 || _root.levelNum == 22)
  60.    {
  61.       trace(" xxxxx  _root.levelNum = " + _root.levelNum);
  62.       _root.gotoAndStop("gameWin");
  63.    }
  64.    else
  65.    {
  66.       trace("-------- _root.levelNum = " + _root.levelNum);
  67.       _root.gotoAndStop("mode");
  68.    }
  69. };
  70.